<?php
    class newsComponents extends sfComponents{
        public function executeTopnews() 
        {
            $this->topnews = Doctrine_Core::getTable('dynamicinfomation')->getTopnews();
        }
        public function executeLastTwoNews()
        {
            $this->lastnews = Doctrine_Core::getTable('dynamicinfomation')->getLastTwoNews();
        }
        public function executeHotNews()
        {
            $this->hotnews = Doctrine_Core::getTable('dynamicinfomation')->getHotNews(5);
        }
    }
?>
